/**
 * https://leetcode.cn/problems/remove-duplicates-from-sorted-list/
 *
 * @author zyj
 * @date 2022年05月20日 11:34
 */
public class _83_删除排序链表中的重复元素 {
    public ListNode deleteDuplicates(ListNode head) {
        ListNode current = head;

        while (current != null && current.next != null){
            if (current.val == current.next.val){
                current.next = current.next.next;
            }else {
                current = current.next;
            }
        }

        return head;
    }
}


